original_answer_path = '../answer/B_maxlen_5000_outmax_200.json'
strip_answer_path = '../answer/B_maxlen_5000_strip.json'

import json

with open(original_answer_path, 'r')as f:
    ans_list = json.load(f)

res_list = [[ans[0].strip()] for ans in ans_list]

with open(strip_answer_path, 'w')as f:
    json.dump(res_list, f, ensure_ascii=False, indent=4)